package com.example.myRules;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyRibbonRule {

    @Bean
    public IRule getRule() {
        // 定制单个客户端负载均衡方式为随机
        return new RandomRule();
    }

}
